#pragma once
#include "Point2D.h"

class Line2D;

class BasicRect2D
{
public:
    Point2D position;
    double width,height;
    BasicRect2D();
    BasicRect2D(Point2D &pt, double newWidth, double newHeight);
    BasicRect2D(double x, double y, double newWidth, double newHeight);
    BasicRect2D(Point2D &pt,Point2D &ptB);
    ~BasicRect2D();
    
    BasicRect2D& set(Point2D &pt, double newWidth, double newHeight);
    BasicRect2D& set(double x, double y, double newWidth, double newHeight);
    BasicRect2D& set(Point2D &pt,Point2D &ptB);
    
    //With other shapes
    //CLOSEST POINT
    BasicRect2D& closestPoint(Point2D &pt, Point2D &from);//my point is a point in the rectange that represents the closest point to pt
    BasicRect2D& closestPoint(Line2D &line, Point2D &from, Point2D &to);//TODO
    
    //CAPTURES
    bool captures(Point2D &pt);
    bool captures(Line2D &line);//TODO
    
    //drawing commands
    void drawSolid(double depth);
    void drawSolid_color(double depth, int hexColor);
    void drawPerim(double depth);
    void drawPerim_width(double depth, double dWidth);
    void drawPerim_color(double depth, int hexColor);
    void drawPerim_widthColor(double depth, double dWidth, int hexColor);
};